class English < ActiveRecord::Base
  attr_accessible :word
  validates :word, presence: true
  has_and_belongs_to_many :deutsches
 
  def self.search(search)
    if search
      find(:all, :conditions => ['word LIKE ?', "%#{search}%"])
    else
      find(:all)
    end
  end
end
